package syntaxTree;

public class StmIfElse extends Stm{
  Exp exp;
	Stm stm1;
	Stm stm2;
	
	public StmIfElse (Exp exp, Stm stm1, Stm stm2)
	{
		this.exp = exp;
		this.stm1 = stm1;
		this.stm2 = stm2;
	}
	public String toString()
	{
	String result = "";
	result += "\tif ";
	result += "( " + exp.toString() + " )\n";
	result += "\t\t" + stm1.toString() + ";\n";
	result += "\telse\n";
	result += "\t\t" + stm2.toString() + ";\n";
	
	return result;
		}
}
